package com.chixing.service;

import com.chixing.VO.OrderQueryVO;
import com.chixing.entity.OrderDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

/**
 * <p>
 * 订单详情服务类
 * </p>
 *
 * @author smith
 * @since 2025-10-01
 */
public interface IOrderDetailService extends IService<OrderDetail> {
    // 查询所有订单详情
    List<OrderDetail> getAllOrderDetails();

    // 根据ID查询订单详情
    OrderDetail getOrderDetailById(Integer id);

    // 新增订单详情
    boolean saveOrderDetail(OrderDetail orderDetail);

    // 更新订单详情
    boolean updateOrderDetail(OrderDetail orderDetail);

    // 删除订单详情
    boolean removeOrderDetailById(Integer id);

    // 根据订单ID查询详情
    List<OrderDetail> getDetailsByOrderId(Integer orderId);

    List<OrderQueryVO> getOrdersByUserId(Integer userId);

    // 按用户ID和状态查询订单
    List<OrderQueryVO> getOrdersByUserIdAndStatus(Integer userId, Integer status);

    OrderQueryVO getOrderByNumber(String orderNumber);
}